<%@ page contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/WEB-INF/views/wx/include/head.jsp" %>
</head>
<body>
	<header class="mui-bar mui-bar-nav">
		<a href="${ctxWx}/pu/demands/list?reactstatus=2" class="mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">定制包车历史</h1>
	</header>
	<div class="mui-content">
		<c:if test="${not empty page.list}">
			<ul class="mui-table-view mui-table-view-striped mui-table-view-condensed">
				<c:forEach items="${page.list}" var="tDemands">
					<li class="mui-table-view-cell" data-demandid="${tDemands.demandid}">
						<div class="mui-pull-left">
							<p style="color:#000000;">${tDemands.departcity.sitename}-${tDemands.destcity.sitename}（${tDemands.cartype.seats}座）</p>
							<p><fmt:formatDate value="${tDemands.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></p>
						</div>
						<div class="mui-pull-right">
							<c:if test="${tDemands.reactstatus == 3 }"><span class="mui-badge mui-badge-success">已支付</span></c:if>
							<c:if test="${tDemands.reactstatus == 4 }"><span class="mui-badge mui-badge-warning">已取消</span></c:if>
						</div>
					</li>
				</c:forEach>
			</ul>
		</c:if>
		<c:if test="${empty page.list}">
			<div style="padding:30px;text-align:center;font-size:14px;color:#9e9e9e;">
				没有历史订单
			</div>
		</c:if>
	</div>
	<%@ include file="/WEB-INF/views/wx/include/script.jsp"%>
	<script type="text/javascript">
		$(function(){
			$('.tabType').on('tap',function(){
				var href=$(this).attr('data-href');
				if(href){
					window.location.href=href;
				}
			});
			$('li.mui-table-view-cell').on('tap',function(e){
				window.location.href='${ctxWx}/pu/demands/view?demandid='+$(this).attr('data-demandid');
			});
		})
	</script>
</body>
</html>